package com.ziyucoding.springboot.labs.lab3.sca.rocketmqdemo.dtp.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ziyucoding.springboot.labs.lab3.sca.rocketmqdemo.dtp.dataobject.Points;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 积分Mapper
 *
 * @author ziyucoding
 * @date 2023-04-02
 **/
@Repository
public interface PointsMapper extends BaseMapper<Points> {

    default Long selectCountById(@Param("orderNo") String orderNo) {
        return selectCount(new QueryWrapper<Points>().eq("order_no", orderNo));
    }

}
